package com.itheima.tlias.Filter;

import jakarta.servlet.*;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;

/**
 * TODO
 *
 * @Author mr.luo
 * @Date 16 4月 2025 09:37
 */
@Slf4j
//@WebFilter(urlPatterns = "/*")
public class TokenFilter2 implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        //1. 放行前的操作
        log.info("[TokenFilter2]拦截器放行前的操作");

        //2. 放行
        log.info("[TokenFilter2]拦截器放行");
        filterChain.doFilter(servletRequest, servletResponse);

        //3. 放行后的操作
        log.info("[TokenFilter2]拦截器放行后返回拦截器的操作");

    }
}
